package edu.hgnc.test;


import edu.hgnc.factoryMethod.Person;
import edu.hgnc.supplier.User;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *测试创建代理代码，扩展spring的bean代理对象
 * 在对象之前，之后执行操作。
 */
public class JustTest5 {

	@Test
	public void test01(){
		System.out.println("======================================================");
		System.out.println("hello,when you see me,that's mean you are test succeed~");
		System.out.println("======================================================");
	}

	@Test
	public void test02() {
		ApplicationContext context = new ClassPathXmlApplicationContext("factoryMethod.xml");
		Person person = context.getBean("person", Person.class);
		System.out.println(person);
		Person person2 = context.getBean("person2", Person.class);
		System.out.println(person2);

	}

}
